import request from '@/utils/request'

export function loginApi(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data:data
  })
}
// login ({mobile:111,password:123456})

// 获取用户信息
/**
 * @description: 获取用户资料
 * @param {*} 参数为空
 * @return {promise}
 */
export function getInfoApi() {
  return request({
    url: '/sys/profile',
    method: 'post',
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}


/**
 * @description: 获取用户头像
 * @param {*} id 用户id
 * @return {*}
 */
 export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`,
  })
}
